public class demo10 {
    public static void main(String[] args) {
        for(int w=100;w<1000; w++){
            int x=w/100;
            int y=w/10%10;
            int z=w%100%10;
            if(x*x*x+y*y+z*z*z==w){
                System.out.println(w);
            }
        }
    }

}


